<!--
 * @Author: dingxiao
 * @Date: 2025-07-02 11:33:51
 * @Description: 跳转调研系统
-->
<template>
  <div v-if="show" class="jump-survey-system">
    <el-button type="primary" size="small" @click="handleJump">跳转调研系统>></el-button>
  </div>
</template>

<script>
import routerJump from '@/api/utils/router-jump';
import { isLeader } from '@/utils/utils';
import { COMPANY_LEADER_IDENTITY_CODES } from '@/utils/constants';

export default {
  name: 'JumpSurveySystem',
  props: {
    formData: {
      type: Object,
      default: () => ({}),
    },
    nodeId: {
      type: String,
      default: '',
    },
  },
  data() {
    return {};
  },
  computed: {
    show() {
      return isLeader(COMPANY_LEADER_IDENTITY_CODES, sessionStorage.getItem('identityDefCode'));
    },
  },
  methods: {
    handleJump() {
      routerJump.jumpToNewWindow('/my-home/research-progress/work-statistics', {});
    },
  },
};
</script>

<style lang="scss" scoped>
.jump-survey-system {
  padding-right: 49px;
  text-align: right;
}
</style>
